package naga.x.proxy;

import java.util.concurrent.atomic.AtomicInteger;

import org.apache.mina.core.session.IoSession;

import naga.x.net.PacketHandler;
import naga.x.net.SessionObserver;

/**
 * 客户端与代理服连接会话
 * @author yang.li
 *
 */
public class ClientSession extends naga.x.net.impl.ClientSession {

	protected static final AtomicInteger IDS = new AtomicInteger();
	
	protected int id; // session id
	
	public ClientSession(IoSession session, PacketHandler handler, SessionObserver observer) {
		super(session, handler, observer);
		this.id = IDS.incrementAndGet();
	}

	@Override
	public long getId() {
		return id;
	}

//	@Override
//	public void received(Packet packet) {
//		super.received(packet);
//	}
	
//	public IoSession ioSess() {
//		return session;
//	}

}
